package top.ranzhang.service.impl;

import top.ranzhang.bean.entity.TeachingResources;
import top.ranzhang.mapper.TeachingResourcesMapper;
import top.ranzhang.service.ITeachingResourcesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ran
 * @since 2025-06-05
 */
@Service
public class TeachingResourcesServiceImpl extends ServiceImpl<TeachingResourcesMapper, TeachingResources> implements ITeachingResourcesService {

    @Override
    public void delete(Long id) {
        removeById(id);
    }

    @Override
    public void update(TeachingResources teachingResource) {
        updateById(teachingResource);
    }

    @Override
    public Object getByIds(Long id) {
        return getById(id);
    }

    @Override
    public Object getAll() {
        return list();
    }

    @Override
    public void Isave(TeachingResources teachingResource) {
        save(teachingResource);
    }

    @Override
    public Integer getResourceCount() {
        return getBaseMapper().getResourceCount();
    }
}
